﻿using personalplaner.common;
using personalplaner.common.mvvm.factory;
using personalplaner.servicemodel.dataaccess;

namespace personalplaner.gui.stamm.viewmodels.factories
{
	public class SetPersonPensumModelFactory : IFactory
	{
		#region IFactory Members

		public object CreateViewModel(System.Windows.DependencyObject sender)
		{
			var vm = new SetPersonPensumViewModel(sender);

			vm.ServiceLocator.RegisterService<IPensumDataAccess>(new PensumDataAccess(SettingsProvider.Settings));

			return vm;
		}

		#endregion
	}
}
